import json
from config.config import cm

class ReadJson:
    def __init__(self,json_file):
        self.json_file = json_file

    def read_json(self,key):
        #返回元祖列表
        arr=[]
        with open(self.json_file,'r',encoding="utf-8") as f:
            datas = json.load(f,)
            value = datas.get(key)
            for data in value:
                arr.append(tuple(data.values())[1:])
            return arr

json_para = ReadJson(cm.test_web_json_file)
#读取json文件中对应模块
login_para = json_para.read_json('login')
group_call_para = json_para.read_json('group_call')
print(login_para)
